//
//  CXHToBidNativeAdData.m
//  CXHAdSDK-ToBid
//
//  Created by 陈坤 on 2025/4/26.
//

#import "CXHToBidNativeAdData.h"
#import <WindFoundation/WindFoundation.h>

@interface CXHToBidNativeAdData ()
@property (nonatomic, weak) CXHAdapterNativeAdData *ad;

@end

@implementation CXHToBidNativeAdData

@synthesize adMode = _adMode;
@synthesize callToAction = _callToAction;
@synthesize desc = _desc;
@synthesize iconUrl = _iconUrl;
@synthesize rating = _rating;
@synthesize title = _title;
@synthesize imageUrlList = _imageUrlList;
@synthesize networkId = _networkId;
@synthesize imageModelList = _imageModelList;

- (instancetype)initWithNativeAd:(CXHAdapterNativeAdData *)nativeAd{
    self = [super init];
    if (self) {
        _ad = nativeAd;
    }
    return self;
}

- (NSString *)title {
    return self.ad.title;
}
- (NSString *)desc {
    return self.ad.desc;
}
- (NSString *)iconUrl {
    return self.ad.iconImageUrl;
}
- (NSString *)callToAction {
    return @"查看详情";
}
- (double)rating {
    return 0;
}

- (AWMMediatedNativeAdMode)adMode{
    return AWMMediatedNativeAdModeLargeImage;
}

- (NSArray *)imageUrlList{
    return self.ad.imageUrlAry;
}

- (NSArray<AWMADImage *> *)imageModelList{
    return nil;
}

- (WindMillAdn)networkId{
    return WindMillAdnCustom;
}

- (AWMNativeAdSlotAdType)adType{
    return AWMNativeAdSlotAdTypeFeed;
}

- (void)dealloc {
    WindmillLogDebug(@"[cxh]", @"%s", __func__);
}

@end
